package com.cq.hd.system.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
@Data
public class FileProperties {

    @Value("${file.baseDir}")
    private String staticBaseDir;
    public static String baseDir;

    @Value("${file.location}")
    private String staticLocation;
    public static String location;

    public static String serverPath;

    @PostConstruct
    public void init() {
        baseDir = staticBaseDir;
        location = staticLocation;

        serverPath = FileProperties.location + FileProperties.baseDir;
    }

}
